<script type="text/javascript">
	function TqtjglTyxxCtrl(CtrlUtil, $http, $scope, modalService, $element) {
		var ctrl = this
		CtrlUtil.build(this, ':root/tqtjgl/zzxx', $scope.ctrl)
	}

</script>
<div ng-controller="TqtjglTyxxCtrl as subCtrl" ng-init="ctrl.subCtrl=subCtrl;ctrl.query()">
	<div class="">
		<button type="button" class="btn btn-cys btn-sm" ng-click="export(ctrl,'root/score/exportScore')">
			<span class="glyphicon glyphicon-export"></span>
			导出
		</button>
	</div>
	<div style="padding-top: 10px;" ng-if="subCtrl">
		<table class="table table-bordered table-hover table-striped" ng-init="ctrl=subCtrl">
			<tr>
				<th rowspan="2" class="line-container">
					<em class="left">院系</em>
					<em class="right">内容</em>
				</th>
				<th colspan="2" class="text-center">团员</th>
				<th colspan="4" class="text-center">团员入党情况</th>
				<th colspan="2" class="text-center">其它</th>
			</tr>
			<tr>

				<th>团员数（包含党员数）</th>
				<th>团员数（不包含党员数）</th>
				<th>申请入党团员数</th>
				<th>推优数</th>
				<th>团员入党数</th>
				<th>经推优入党的团员数</th>
				<th>发展新团员数</th>
				<th>28周岁以下青年书</th>
			</tr>
			<tr ng-repeat="item in ctrl.entities">
				<td>{{item.yx.mc}}</td>
				<td>{{item.tysbhdy}}</td>
				<td>{{item.tysbbhdy}}</td>
				<td>{{item.sqrdtys}}</td>
				<td>{{item.tys}}</td>
				<td>{{item.tyrds}}</td>
				<td>{{item.jtyrddtys}}</td>
				<td>{{item.fzxtys}}</td>
				<td>{{item.ebzsyxqns}}</td>
			</tr>
		</table>
	</div>
	<div class="hidden" ng-non-bindable template>
		<div add>
			<form class="form-horizontal" single-student>
				<div class="form-group" ng-show="search.enable">
					<label class="col-md-2 control-label">学生</label>
					<div class="col-md-10 open">
						<input type="text" ng-change="ctrl.searchStudent(search.name,search)" ng-model="search.name" class="form-control" placeholder="按姓名/学号模糊搜索">
						<ul class="dropdown-menu" ng-show="search.students.content.length>0">
							<li ng-repeat="t in search.students.content">
								<a href="javascript:;" ng-click="search.stuInfo=t;result.stuInfo.id=t.id;search.students=null;">({{t.user.uid}}){{t.user.name}}-{{t.term.name+t.term.trainType.name}}</a>
							</li>
						</ul>
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-2 control-label">期次</label>
					<div class="col-md-10">
						<input type="text" class="form-control" disabled="disabled" title="{{search.stuInfo.term.name+search.stuInfo.term.trainType.name}}" value="{{search.stuInfo.term.name+search.stuInfo.term.trainType.name}}">
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-2 control-label">姓名</label>
					<div class="col-md-4">
						<input type="text" ng-model="search.stuInfo.user.name" class="form-control" disabled="disabled">
					</div>
					<label class="col-md-2 control-label">性别</label>
					<div class="col-md-4">
						<input type="text" class="form-control" ng-model="search.stuInfo.sexString" disabled="disabled">
					</div>
				</div>

				<div class="form-group">
					<label class="col-md-2 control-label">学号/工号</label>
					<div class="col-md-4">
						<input type="text" class="form-control" disabled="disabled" value="{{search.stuInfo.user.uid}}">
					</div>
					<label class="col-md-2 control-label">年级</label>
					<div class="col-md-4">
						<input type="text" class="form-control" ng-model="search.stuInfo.user.grade" disabled="disabled" value="2015">
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-2 control-label">院系</label>
					<data entity="Department" auto-load="true" after-refresh="Dep=data[0]">
						<filter field="id" value="search.stuInfo.user.department"></filter>
					</data>
					<div class="col-md-4">
						<input type="text" class="form-control" disabled="disabled" ng-model="Dep.name">
					</div>
					<label class="col-md-2 control-label">职务</label>
					<div class="col-md-4">
						<input class="form-control" disabled="disabled" ng-model="search.stuInfo.zw">
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-2 control-label">联系电话</label>
					<div class="col-md-4">
						<input type="text" disabled="disabled" ng-model="search.stuInfo.phone" class="form-control">
					</div>
					<label class="col-md-2 control-label">QQ</label>
					<div class="col-md-4">
						<input type="text" disabled="disabled" ng-model="search.stuInfo.qq" class="form-control">
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-2 control-label">班级</label>
					<div class="col-md-4">
						<input class="form-control" disabled="disabled" ng-model="search.stuInfo.classInfo.bjName">
					</div>
					<label class="col-md-2 control-label">校区</label>
					<div class="col-md-4">
						<span class="form-control" disabled="disabled" ng-bind="search.stuInfo.xq"></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-2 control-label">备注</label>
					<div class="col-md-10">
						<input type="text" disabled="disabled" class="form-control" ng-model="search.stuInfo.bz">
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-2 control-label">心得</label>
					<data entity="StuXd" auto-load="true" after-refresh="xd=data[0].xd">
						<filter field="stuInfo" value="search.stuInfo.id"> </filter>
						<filter field="status" value="1"> </filter>
					</data>
					<div class="col-md-10">
						<textarea type="text" style="resize:none;" rows="4" disabled="disabled" class="form-control" ng-model="xd"></textarea>
					</div>
				</div>
				<div class="form-group">
					<label class="col-md-2 control-label">考核结果</label>
					<div class="col-md-10">
						<select class="form-control" ng-model="result.khjg">
							<option ng-value=""></option>
							<option ng-value="'优秀'">优秀</option>
							<option ng-value="'合格'">合格</option>
							<option ng-value="'不合格'">不合格</option>
						</select>
					</div>
				</div>
			</form>
		</div>
		<div import class="col-md-10 col-md-offset-1">
			<form class="form-horizontal" enctype="multipart/form-data" method="post">
				<div class="form-group">
					<div class="col-md-12 ">
						<select name="term" class="form-control" chosen ng-value="term">
							<option value="">期次</option>
							<option value="{{m.id}}" ng-selected="$index==0" ng-repeat="m in supCtrl.terms">{{(m.name+'-第'+m.qs+'期')}}</option>
						</select>
					</div>
				</div>
				<div class="form-group">
					<div class="col-md-12">
						<input class="form-control" id="fileImport" name="file" type="file" />
					</div>
				</div>
				<div class="form-group">
					<div class="col-md-12">
						<a type="submit" ng-click="upload()" class="btn btn-success">导入</a>
						<a class="btn btn-link btn-sm" href="asset/excel/studenScoreSample.xls">
							<span class="glyphicon glyphicon-arrow-down"></span>
							导入模板下载
						</a>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>